#!/bin/env bash
PHP_VERS=${PHP_V//\./} && \
PHP_LISTEN_PORT=90${PHP_VERS} && \
LISTEN_LINE_INFO=`more /etc/php/$PHP_V/fpm/pool.d/www.conf | grep 'listen =' -n` && \
sed -i ${LISTEN_LINE_INFO%%\:*}'i listen = '${PHP_LISTEN_PORT} /etc/php/$PHP_V/fpm/pool.d/www.conf && \
sed -i 's/^listen =\(.*\).sock/;listen =(\1).sock/g' /etc/php/$PHP_V/fpm/pool.d/www.conf && \
more /etc/php/$PHP_V/fpm/pool.d/www.conf | grep 'listen =' -n
